home *** CD-ROM | disk | FTP | other *** search
- class LineIndicator extends MovieClip
- {
- var ts;
- var it = 0;
- var ia = 0;
- var ta = 0;
- static var et = 300;
- static var iac = 21.991148575128552;
- function LineIndicator()
- {
- super();
- this._visible = true;
- }
- function update(s, pv)
- {
- this.ts = this.ts != undefined ? this.ts : s;
- if(this.ts != s)
- {
- this.ts = s;
- if(!this.ts.s)
- {
- var _loc3_ = pv / Vars.tVel;
- this.ta = LineIndicator.iac / this.ts.r * Trig.rd * this.ts.d * Math.sin(_loc3_ * 1.5707963267948966);
- }
- else
- {
- this.ta = 0;
- }
- this.ia = this._rotation;
- this.it = getTimer();
- }
- if(getTimer() > this.it + LineIndicator.et)
- {
- this._rotation = this.ta;
- }
- else
- {
- this._rotation = Sine.easeInOut(getTimer() - this.it,this.ia,this.ta - this.ia,LineIndicator.et);
- }
- return this._rotation;
- }
- function findta(pv)
- {
- if(this.ts.s)
- {
- this.ta = 0;
- }
- else
- {
- var _loc2_ = pv / Vars.tVel;
- this.ta = LineIndicator.iac / this.ts.r * Trig.rd * this.ts.d * Math.sin(_loc2_ * 1.5707963267948966);
- }
- }
- }
-